package cn.seaboot.admin.reverse.bean;


import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigInteger;

/**
 * POJO
 * MySQL列 [t_db_data_columns]
 *
 * @author ChenSS on 2018-06-14 00:40
 */
@Schema(description = "MySQL列 [t_db_data_columns] 实体类")
public class DataColumn implements Serializable {
    private static final long serialVersionUID = -5209951840190809593L;
    /**
     * 表格目录，MySQL下为表目录
     */
    @NotNull
    @Size(max = 512)
    @Schema(description = "表空间")
    private String tableCatalog;
    /**
     * 归属数据库
     */
    @NotNull
    @Size(max = 64)
    @Schema(description = "归属数据库")
    private String tableSchema;
    /**
     * 表名
     */
    @NotNull
    @Size(max = 64)
    @Schema(description = "表名")
    private String tableName;
    /**
     * 列名
     */
    @NotNull
    @Size(max = 64)
    @Schema(description = "列名")
    private String columnName;
    /**
     * 字段顺序
     */
    @NotNull
    @Schema(description = "字段顺序")
    private String ordinalPosition;
    /**
     * 默认值
     */
    @Size(max = 294967295)
    @Schema(description = "默认值")
    private String columnDefault;
    /**
     * 是否为空
     */
    @NotNull
    @Size(max = 3)
    @Schema(description = "是否为空")
    private String isNullable;
    /**
     * 数据类型
     */
    @NotNull
    @Size(max = 64)
    @Schema(description = "数据类型")
    private String dataType;
    /**
     * 最大字符长度
     */
    @Schema(description = "最大字符长度")
    private BigInteger characterMaximumLength;
    /**
     * 最大字节长度
     */
    @Schema(description = "最大字节长度")
    private BigInteger characterOctetLength;
    /**
     * 数字长度
     */
    @Schema(description = "数字长度")
    private BigInteger numericPrecision;
    /**
     * 小数长度
     */
    @Schema(description = "小数长度")
    private BigInteger numericScale;
    /**
     * 日期表达式
     */
    @Schema(description = "日期表达式")
    private BigInteger datetimePrecision;
    /**
     * 字符集
     */
    @Size(max = 32)
    @Schema(description = "字符集")
    private String characterSetName;
    /**
     * 字符排序规则
     */
    @Size(max = 32)
    @Schema(description = "字符排序规则")
    private String collationName;
    /**
     * 列类型
     */
    @NotNull
    @Size(max = 294967295)
    @Schema(description = "列类型")
    private String columnType;
    /**
     * 键类型
     */
    @NotNull
    @Size(max = 3)
    @Schema(description = "键类型")
    private String columnKey;
    /**
     * 字段描述
     */
    @NotNull
    @Size(max = 1024)
    @Schema(description = "字段描述")
    private String columnComment;

    public String getTableCatalog() {
        return tableCatalog;
    }

    public void setTableCatalog(String tableCatalog) {
        this.tableCatalog = tableCatalog;
    }

    public String getTableSchema() {
        return tableSchema;
    }

    public void setTableSchema(String tableSchema) {
        this.tableSchema = tableSchema;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getOrdinalPosition() {
        return ordinalPosition;
    }

    public void setOrdinalPosition(String ordinalPosition) {
        this.ordinalPosition = ordinalPosition;
    }

    public String getColumnDefault() {
        return columnDefault;
    }

    public void setColumnDefault(String columnDefault) {
        this.columnDefault = columnDefault;
    }

    public String getIsNullable() {
        return isNullable;
    }

    public void setIsNullable(String isNullable) {
        this.isNullable = isNullable;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public BigInteger getCharacterMaximumLength() {
        return characterMaximumLength;
    }

    public void setCharacterMaximumLength(BigInteger characterMaximumLength) {
        this.characterMaximumLength = characterMaximumLength;
    }

    public BigInteger getCharacterOctetLength() {
        return characterOctetLength;
    }

    public void setCharacterOctetLength(BigInteger characterOctetLength) {
        this.characterOctetLength = characterOctetLength;
    }

    public BigInteger getNumericPrecision() {
        return numericPrecision;
    }

    public void setNumericPrecision(BigInteger numericPrecision) {
        this.numericPrecision = numericPrecision;
    }

    public BigInteger getNumericScale() {
        return numericScale;
    }

    public void setNumericScale(BigInteger numericScale) {
        this.numericScale = numericScale;
    }

    public BigInteger getDatetimePrecision() {
        return datetimePrecision;
    }

    public void setDatetimePrecision(BigInteger datetimePrecision) {
        this.datetimePrecision = datetimePrecision;
    }

    public String getCharacterSetName() {
        return characterSetName;
    }

    public void setCharacterSetName(String characterSetName) {
        this.characterSetName = characterSetName;
    }

    public String getCollationName() {
        return collationName;
    }

    public void setCollationName(String collationName) {
        this.collationName = collationName;
    }

    public String getColumnType() {
        return columnType;
    }

    public void setColumnType(String columnType) {
        this.columnType = columnType;
    }

    public String getColumnKey() {
        return columnKey;
    }

    public void setColumnKey(String columnKey) {
        this.columnKey = columnKey;
    }

    public String getColumnComment() {
        return columnComment;
    }

    public void setColumnComment(String columnComment) {
        this.columnComment = columnComment;
    }

    @Override
    public String toString() {
        return "DbDataColumns{" +
                "tableCatalog='" + tableCatalog + '\'' +
                ", tableSchema='" + tableSchema + '\'' +
                ", tableName='" + tableName + '\'' +
                ", columnName='" + columnName + '\'' +
                ", ordinalPosition='" + ordinalPosition + '\'' +
                ", columnDefault=" + columnDefault +
                ", isNullable='" + isNullable + '\'' +
                ", dataType='" + dataType + '\'' +
                ", characterMaximumLength=" + characterMaximumLength +
                ", characterOctetLength=" + characterOctetLength +
                ", numericPrecision=" + numericPrecision +
                ", numericScale=" + numericScale +
                ", datetimePrecision='" + datetimePrecision + '\'' +
                ", characterSetName='" + characterSetName + '\'' +
                ", collationName='" + collationName + '\'' +
                ", columnType='" + columnType + '\'' +
                ", columnKey='" + columnKey + '\'' +
                ", columnComment='" + columnComment + '\'' +
                '}';
    }
}
